package cn.explink.dop.entity.vo;

import java.math.BigDecimal;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Transient;

import cn.explink.dop.tools.Tools;
import cn.explink.eap.core.common.entity.IdEntity;

@Entity
@Table(name = "or_return")
public class ReturnVO extends IdEntity {

	/*
	 * 配送人员名称
	 */
	private String sendPersonName;
	/*
	 * 上交金额
	 */
	private Float upMoney;

	/*
	 * 状态
	 */
	private String status;

	/*
	 * 电话
	 */
	// private String telephone;

	/*
	 * 归班单号
	 */
	private String billNo;

	/*
	 * 配送地点
	 */
	private String send_place;
	/*
	 * 配送时间
	 */
	private java.util.Date sendTime;
	/*
	 * 收款类型
	 */
	private int pay_method;
	/*
	 * 菜单
	 */
	private String order_name;
	/*
	 * 订单数量
	 */
	private int number;
	/*
	 * 配送人员工资
	 */
	private BigDecimal salary;
	/*
	 * 配送时间查询条件 截止时间
	 */
	@Transient
	private java.util.Date endTime;
	private List<OrderVO> orderVOList;

	@Transient
	public void setEndTime(java.util.Date endTime) {
		this.endTime = endTime;
	}

	@Transient
	public java.util.Date getEndTime() {
		return this.endTime;
	}

	@Column(name = "return_billno")
	public String getBillNo() {
		return this.billNo;
	}

	public void setBillNo(String billNo) {
		this.billNo = billNo;
	}

	public String getSend_place() {
		return this.send_place;
	}

	public void setSend_place(String send_place) {
		this.send_place = send_place;
	}

	public int getPay_method() {
		return this.pay_method;
	}

	public void setPay_method(int pay_method) {
		this.pay_method = pay_method;
	}

	public String getOrder_name() {
		return this.order_name;
	}

	public void setOrder_name(String order_name) {
		this.order_name = order_name;
	}

	@Column(name = "salary")
	public BigDecimal getSalary() {
		return this.salary;
	}

	public void setSalary(BigDecimal salary) {
		this.salary = salary;
	}

	@Column(name = "send_personname")
	public String getSendPersonName() {
		return this.sendPersonName;
	}

	public void setSendPersonName(String sendPersonName) {
		this.sendPersonName = sendPersonName;
	}

	@Column(name = "up_money")
	public Float getMoney() {
		return this.upMoney;
	}

	public void setMoney(Float upMoney) {
		this.upMoney = upMoney;
	}

	@Column(name = "return_status")
	public String getStatus() {
		return this.status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	// @Column(name = "send_time")
	// public String getTelephone() {
	// return telephone;
	// }
	//
	// public void setTelephone(String telphone) {
	// this.telephone = telphone;
	// }

	@Column(name = "send_time")
	public java.util.Date getCreateTime() {
		return this.sendTime;
	}

	public void setCreateTime(java.util.Date sendTime) {
		this.sendTime = sendTime;
	}

	@Transient
	public String getCreateTimeStr() {
		return Tools.formatTime(this.getCreateTime(), "yyyy-MM-dd");
	}

	@Transient
	public String getEndTimeStr() {
		return Tools.formatTime(this.getEndTime(), "yyyy-MM-dd");
	}

	@Column(name = "order_count")
	public int getNumber() {
		return this.number;
	}

	public void setNumber(int number) {
		this.number = number;
	}

	@OneToMany(mappedBy = "returnVO", cascade = CascadeType.ALL, fetch = FetchType.LAZY)
	public List<OrderVO> getOrderVOList() {
		return this.orderVOList;
	}

	public void setOrderVOList(List<OrderVO> orderVOList) {
		this.orderVOList = orderVOList;
	}
}
